<?php $total = 0; ?>
<h2><?php print $this->table->label ?></h2>
<ul id="addmenu_list">
    <li><?php print a(imghtml('add_food.png') , '#', array('w' => 800, 'tid' => $this->table->id, 'type' => 1), array('rel' => "popup", 'class' => 'poplight','title'=>'Add food')) ?></li>
    <li><?php print a(imghtml('add_drink.png'), '#', array('w' => 800, 'tid' => $this->table->id, 'type' => 2), array('rel' => "popup", 'class' => 'poplight','title'=>'Add drink')) ?></li>
</ul>
<!--popup-->
<div id="popup" class="popup_block">
    <a href="#" class="close"> <?php print imghtml('close_pop.png', null, array('class' => 'btn_close', 'title' => 'Close window', 'alt' => 'close')) ?></a>
</div>
<!--menu-->
<div id="menus" class="left">
    <?php foreach ($this->menu as $key => $menu) : ?>
        <div class="menu">
            <div class="image">
                <?php print img($menu->imgpath, 'thumbnail') ?>
                <span class="price"><?php print t("price") ?> : <?php print $menu->price ?> Riel</span>
            </div>
            <div class="info">
                <span class="name"><?php print $menu->name ?></span> <span class="amount"><?php print $menu->amount ?></span>
            </div>
        </div>
    <?php endforeach; ?>
    
    <div class="clearfix"></div>
    <hr />
    
    <?php print a(imghtml('deal.png'),'/order/deal',array('tid'=>$this->table->tableOrderId))?>
</div>
<!--resume-->
<div id="menu_sidebar" class="left resume">
    <h4><?php print t("bill"); ?></h4>
    <ul>
        <?php
        foreach ($this->menu as $key => $menu) :
            $price = $menu->price * $menu->amount;
            $total += $price;
            ?>
            <li>
                <span><?php print $menu->amount ?> - </span>
                <span class="name"><?php print $menu->name ?></span>
                <span class="detail"><?php print $price ?></span>
            </li>
        <?php endforeach; ?>
    </ul>
    <hr />
    <p class="total"><span><?php print t("total", 'en') ?></span> <span class="detail"><?php print $total ?></span></p>
</div>